<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
    *{margin: 0;padding: 0;}
    ul{
        list-style: none;
    }
    li{
        float:left;
        text-align: center;
        width: 100px;
    }
    .nav{
        line-height: 50px;
        /* background: pink; */
        overflow: hidden;
    }
    a{
        text-decoration: none;
        color:blue;
        display: block; 
    }
    a:hover{
        background-color:deeppink;
        color: #eee;
    }
    </style>
</head>
<body>
    <div class="nav">
        <ul>
            <li><a href="#">手机</a></li>
            <li><a href="#">电脑</a></li>
            <li><a href="#">平板</a></li>
        </ul>
    </div>
</body>
</html>
